package com.itheima.tlias.controller;

import com.itheima.tlias.po.LoginParam;
import com.itheima.tlias.service.LoginService;
import com.itheima.tlias.util.ResultUtil;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
public class LoginController {

    @Resource
    LoginService loginService;


    @PostMapping("login")
    public ResultUtil login(@RequestBody LoginParam param){
        return loginService.login(param);
    }
}
